From Functional Logic Programs to Purely Functional Programs Preserving Laziness

نویسندگان

  • Bernd Brassel
  • Sebastian Fischer
چکیده

Functional logic languages extend the setting of functional programming by non-deterministic choices, free variables and narrowing. Most existing approaches to simulate logic features in functional languages do not preserve laziness, i.e., they can only model strict logic programming like in Prolog. Lazy functional logic programming however, has interesting properties supporting a more declarative style of programming search without sacrificing efficiency. We will present a recently developed technique to reduce all logic extensions to the single problem of generating unique identifiers. The impact of this reduction is a general scheme for compiling functional logic programs to lazy functional programs without side effects. One of the design goals is that the purely functional parts of a program should not suffer from significant run-time overhead. Preliminary experiments confirm our hope for significant improvements of run-time performance even for non-deterministic programs but suggest further work to improve the memory requirements of those.

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

A Deterministic Operational Semantics for Functional Logic Programs

This paper introduces a deterministic operational semantics for functional logic programs including notions like laziness, sharing, concurrency, non-deterministic functions, etc. Our semantic description is important not only to provide appropriate language definitions to reason about programs and check the correctness of implementations but it is also a basis to develop language-specific tools...

متن کامل

Functional Speci cation of Imperative Programs: An Alternative Point of View of Functional Languages

In this paper we will show how to embed functional concepts in an imperative host language in a natural way. This is achieved by interpreting functional programs as spec-iications of imperative programs. We will introduce a reened notion of laziness, which allows us to interpret lazy computations as special constructors, which encapsulate the suspended computation. Even higher-order concepts ca...

متن کامل

Operational Semantics for Functional Logic Languages

In this work we provide a semantic description of functional logic languages covering notions like laziness, sharing, and non-determinism. Such a semantic description is essential, for instance, to have appropriate language definitions in order to reason about programs and check the correctness of implementations. First, we define a “big-step” semantics in natural style to relate expressions an...

متن کامل

Compiling Laziness Using Projection Types

Strictness analysis is accepted as an important tool for the eecient implementation of lazy functional languages. However, the analyses are usually rst-order and the optimisations that follow may be ad hoc. Using projections to represent static properties of programs is appealing because they naturally describe component-wise demand on data structures and can handle latent demands such as head-...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 2008